<template>
  <div class="success-page">
    <div class="success-container">
      <h1>支付成功！</h1>
      <van-button @click="toorder()">返回</van-button>
    </div>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data() {
    return {
      payId:localStorage.getItem('payId'),
    };
  },
  methods: {
    toorder(){
      axios.post("/shoppingorder/updatestatus?id="+this.payId).then(res=>{
        console.log("支付成功")
      })
      this.$router.push('/shoppingorder')
    },
  }
};
</script>

<style scoped>
.success-page {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
}

.success-container {
  text-align: center;
  background-color: #fff;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
  color: #4CAF50;
  margin-bottom: 20px;
}

p {
  margin-bottom: 30px;
}

.back-button {
  background-color: #008CBA;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}
</style>
